package com.lin.learning.questionmanagement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.our.learning.infrastructure.po.Question;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface QuestionMapper extends BaseMapper<Question> {

    @Select("select q.* " +
            "from t_question q, t_question_nature qn " +
            "where q.id = qn.id " +
            "and q.type = #{type} " +
            "and difficulty = #{difficulty}")
    List<Question> getOneByTypeAndDifficulty(String type, Integer difficulty);

}
